package gui;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

import controller.Controller;

public class ApplicationFrame extends JFrame {

	private Southpane southpane;

	public ApplicationFrame() {
		Controller.init(this);
		setLayout(new BorderLayout());
		setTitle("Sjakk");
		add(new Northpane(), BorderLayout.NORTH);
		add(new Centerpane(), BorderLayout.CENTER);
		add(southpane = new Southpane(), BorderLayout.SOUTH);
		setVisible(true);
		setJMenuBar(new Mainmenu());
		setSize(600, 600);
		setLocation(350, 75);
		setVisible(true);
		JOptionPane.showMessageDialog(null, "Hvit spiller begynner");
	}

	public void setStatustextForWhitePlayer(String messageForWhitePlayer) {
		southpane.setStatustextForWhitePlayer(messageForWhitePlayer);
	}

	public void setStatustextForBlackPlayer(String messageForBlackPlayer) {
		southpane.setStatustextForBlackPlayer(messageForBlackPlayer);
	}

}